import http from "@/utils/http";

/**
 * @description: 获取当前用户的浏览记录
 * @param {*}
 * @return {*}
 */

export const findHistoryByIdAPI = (id) => {
    return http.get('/history/findById', {
        params: { id }
    });
}

/**
 * @description: 根据data对象进行新增浏览记录
 * @param {data} 用户对象
 * @return {*}
 */
export function insertHistoryAPI(data){
    return http.post('/history/addHistory',data);
}

/**
 * @description: 删除浏览记录
 * @param {*}
 * @return {*}
 */
export const delHistoryAPI = (userId,productId) => {
    return http.get('/history/deleteById', {
        params: { userId,productId }
    });
}